package com.qyer.lxp.model.availability.parameter;

import com.qyer.lxp.common.framework.adapter.DateAdapter;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 验价传入参数model
 * Created by jiangping on 16/5/12.
 */
@XmlRootElement(name = "availability-request")
@XmlAccessorType(XmlAccessType.FIELD)
public class AvailabilityRequest implements Serializable{
    private static final long serialVersionUID = -1126585334761774931L;

    /**
     * 币种
     * 如：CNY、HKD
     */
    private String currency;

    /**
     * 销售项目code
     */
    @XmlElement(name = "sale-code")
    private String saleCode;

    /**
     * 旅行日期
     */
    @XmlElement(name = "travel-date")
    @XmlJavaTypeAdapter(value = DateAdapter.class)
    private Date travelDate;

    /**
     * 旅行结束日期（酒店需要填写）
     */
    @XmlElement(name = "end-date")
    @XmlJavaTypeAdapter(value = DateAdapter.class)
    private Date endDate;

    /**
     * 购买的规格及数量
     */
    @XmlElementWrapper(name = "booked-specifications")
    @XmlElement(name = "booked-specification")
    private List<BookedSpecification> bookedSpecifications;

    /**
     * 购买的附件选项及数量
     */
    @XmlElementWrapper(name = "booked-additional-options")
    @XmlElement(name = "additional-option")
    private List<AdditionalOption> additionalOption;

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public String getSaleCode() {
        return saleCode;
    }

    public void setSaleCode(String saleCode) {
        this.saleCode = saleCode;
    }

    public Date getTravelDate() {
        return travelDate;
    }

    public void setTravelDate(Date travelDate) {
        this.travelDate = travelDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public List<BookedSpecification> getBookedSpecifications() {
        return bookedSpecifications;
    }

    public void setBookedSpecifications(List<BookedSpecification> bookedSpecifications) {
        this.bookedSpecifications = bookedSpecifications;
    }

    public List<AdditionalOption> getAdditionalOption() {
        return additionalOption;
    }

    public void setAdditionalOption(List<AdditionalOption> additionalOption) {
        this.additionalOption = additionalOption;
    }

    @Override
    public String toString() {
        return "AvailabilityRequest{" +
                "currency='" + currency + '\'' +
                ", saleCode='" + saleCode + '\'' +
                ", travelDate=" + travelDate +
                ", endDate=" + endDate +
                ", bookedSpecifications=" + bookedSpecifications +
                ", additionalOption=" + additionalOption +
                '}';
    }
}
